<%-- 
    Document   : index
    Created on : Sep 25, 2011, 2:35:56 PM
    Author     : LegACy
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:include page="/header.jsp"></jsp:include>
<h1>Available Flights</h1>
<table>
    <tr>
        <th class="td-no">No</th>
        <th>Asal</th>
        <th>Tujuan</th>
        <th>Maskapai</th>
        <th>Kelas</th>
        <th>Waktu</th>
        <th>Harga</th>
    </tr>
    <c:forEach items="${flights}" var="flight">
        <c:set var="ordinal" value="${ordinal + 1}" />
        <tr id="record-${flight.getID()}">
            <td>${ordinal}</td>
			<td>${flight.getOrigin()}</td>
			<td>${flight.getDestination()}</td>
			<td>${flight.getAirline()}</td>
			<td>${flight.getClassName()}</td>
			<td>${flight.getTime()}</td>
			<td>${flight.getFare()}</td>
        </tr>
    </c:forEach>
</table>
<jsp:include page="/footer.jsp"></jsp:include>